<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"    xmlns:f="http://java.sun.com/jsf/core"        
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:c="http://java.sun.com/jsp/jstl/core">
<ui:composition template="../templates/admin/template.xhtml">
      
    <ui:define name="adminLogin">
        <!-- LOGIN FORM -->
        <h:form>
            <table>
                <tr>
                    <td><h:outputText value="#{msgs.email}" /></td>
                    <td><h:inputText id="email" value="#{loginBean.email}" 
                                     required="true"
                                     requiredMessage="#{msgs.emailLoginRequired}"
                                     validatorMessage="#{msgs.invalidEmail}">
                            <f:validateRegex pattern="#{validation.email}"/>
                        </h:inputText>
                        <div>
                            <h:message for="email" styleClass="errorMessage"/>
                        </div>   
                    </td>
                </tr>
                <tr>
                    <td><h:outputText value="#{msgs.password}" /></td>
                    <td><h:inputSecret id="password"  value="#{loginBean.password}"
                                       required="true"
                                       requiredMessage="#{msgs.passwordRequired}"/>
                         
                        <div>
                            <h:message for="password" styleClass="errorMessage"/>
                         </div>   
                    </td>
                </tr>
                <tr>
                    <td> </td>
                    <td><h:commandButton value="#{msgs.loginAction}" action="#{loginBean.loginAdminAction}"/>
                    </td>
                </tr>
                          
            </table>
            <div>
                <h:outputText value="#{msgs.invalidUser}" rendered="#{loginBean.invalidUser}"/>
            </div> 
        </h:form>
        <!-- END OF LOGIN FORM -->
        
    </ui:define>
     <ui:define name="bottom">
      </ui:define>
</ui:composition>
</html>    